package com.howard.utils;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;

/**
 *
 * @author Howard He
 *
 */
public final class XmlUtils {

	private XmlUtils(){}

	public static Document loadXML(String xmlPath) {
		Document document = null;
		try {
			document = new SAXReader().read(Thread.currentThread().getContextClassLoader().getResource(xmlPath));
		} catch (DocumentException e) {
			e.printStackTrace();
		}
		return document;
	}
}
